<?php 

	function get_json_info($url) {


		$ch = curl_init();

		curl_setopt($ch, CURLOPT_URL, $url);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
		$data = curl_exec($ch);
		curl_close($ch);
		if ($data == false) {
			return curl_error($ch);
		}
		return $data;
	}
 
	function post_json_info($url,$parma) {


		$ch = curl_init();
		curl_setopt($ch, CURLOPT_URL, $url);
		curl_setopt($ch, CURLOPT_HEADER, 1);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
		curl_setopt($ch, CURLOPT_POST, 1);

		if (isset($parma)) {
			curl_setopt($ch, CURLOPT_POSTFIELDS, $parma);
		}
			
		$data = curl_exec($ch);
		curl_close($ch);
		return $data;
	}

	function str_change_info($str) {
		$count = intval($str);
		if ($count >= 10000) {
			$info =	number_format($count/10000.0,1); 
			return $info."万";
		}else {
			return $str;
		}
	}

	 function check_verify($code, $id = '')
       {
         $verify = new \Think\Verify();
         $res = $verify->check($code, $id);
         return $res;
       }